package pe.org.jhsystem.consola.cola.thread;

import pe.org.jhsystem.consola.cola.gestion.ColaSincronizada;

/**
 *
 * @author jhuamanv
 */
public class Consumidor implements Runnable {
    ColaSincronizada colaConsumidor;

    public Consumidor( ColaSincronizada paramCola ) {
        colaConsumidor = paramCola;
        new Thread( this, "Consumidor" ).start();
    }

    public void run() {
        while ( true ) // Bucle infinito
        colaConsumidor.obten( );
    }
}